﻿using System;
using System.Windows;
using Microsoft.Phone.Tasks;

namespace Kiva7.Pages
{
    public partial class MainLenderControl
    {
        public MainLenderControl()
        {
            InitializeComponent();
        }

        private void ViewLoansClick(object sender, RoutedEventArgs e)
        {
            DoNavigate(LoansPage.PageUrl);
        }

        private void ShowLenderPageClick(object sender, RoutedEventArgs e)
        {
            WebBrowserTask task = new WebBrowserTask
                {
                    Uri = new Uri(string.Format("http://www.kiva.org/lender/{0}", LenderID.Text))
                };
            task.Show();
        }

        private void BaseUserControlLoaded(object sender, RoutedEventArgs e)
        {
            grid.Visibility = Visibility.Visible;
        }
    }
}
